﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BPM.Web;
using BPM.Web;
using BPM.ViewModel;
using BPM.Service;

namespace BPM.Controllers
{
	public class SearchController : InternalViewController
	{
		public ActionResult Storage(StorageSearchCondition vm)
		{
			var svc = new MaterialDefinitionService();
			var result = svc.Search(vm.CompanyName, vm.MaterialName, vm.Page.GetValueOrDefault(1), 15);
			this.ViewData["PreviousSeachCondition"] = vm;
			this.ViewData["Models"] = result;
			return View();
		}
	}

	public class SearchControllerActions : ControllerDefinition<SearchController>
	{
		public readonly string Storage = "Storage";
	}
}